package com.msti.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

@Entity
public class Batch {

	private String batchId; 	
	private Date startDate; 			
	private Date compleatedDate; 			
	private List<Student> students = new ArrayList<Student>();
	private Course course;
	private Certificate certificate;
	
	@ManyToOne
	@JoinColumn(name="certificateId")
	public Certificate getCertificate() {
		return certificate;
	}
	public void setCertificate(Certificate certificate) {
		this.certificate = certificate;
	}
	
	@ManyToOne
	public Course getCourse() {
		return course;
	}
	public void setCourse(Course course) {
		this.course = course;
	}
	
	@ManyToMany
	public List<Student> getStudents() {
		return students;
	}
	public void setStudents(List<Student> students) {
		this.students = students;
	}
	
	@Id
	public String getBatchId() {
		return batchId;
	}
	public void setBatchId(String id) {
		this.batchId = id;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getCompleatedDate() {
		return compleatedDate;
	}
	public void setCompleatedDate(Date compleatedDate) {
		this.compleatedDate = compleatedDate;
	}
		
	
}
